import { AppDataSource } from "./data-source"
// import { User } from "./entity/User"

// AppDataSource.setOptions({
//     entities: [User]
// })
AppDataSource.initialize().then(async () => {

    console.log("Inserting a new user into the database...")
    // const user = new User()
    // user.username = 'admin'
    // user.password_hash = '123456'
    // user.email = "aa"
    //
    // await AppDataSource.manager.save(user)
    //
    // console.log("Loading users from the database...")
    // const users = await AppDataSource.manager.find(User)
    // console.log("Loaded users: ", users)

    console.log("Here you can setup and run express / fastify / any other framework.")

}).catch(error => console.log(error))
